package com.manager.seat.controller;

import com.manager.seat.model.TbCoursePage;
import com.manager.seat.model.TbSysUser;
import com.manager.seat.service.CourseService;
import com.manager.seat.service.TbSysUserService;
import com.manager.seat.util.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * @ClassName IoginController
 * @Description TODO
 * @date 2022/10/29 11:03
 * @Version 1.0
 */
@RestController
@RequestMapping(value = "/course/manager")
@Slf4j
public class CourseController {
    @Autowired
    CourseService courseService;


    @GetMapping("/{type}")
    public JsonResult<List<TbCoursePage>> getAll(@PathVariable("type") String type) {

        return new JsonResult<>(courseService.getAll(type));
    }


}
